# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-terminable-thread
_pkgname=terminable_thread
pkgver=0.7.1
pkgrel=6
pkgdesc='Provides a subclass of Thread with facilities to raise an exception in the thread or terminate the thread from another thread.'
url='https://pypi.org/project/terminable_thread/#files'
arch=('any')
license=('WTFPL')
depends=('python')
makedepends=('python-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('66595d1609afedd6f477b441cad1466fb57d3775721493b54e9d43ea19410ca9f72970f90bf245f2e9ada69d92a4a5d457e377a3fdc785b546521a8a44535cf4')

build() {
  cd "$_pkgname-$pkgver"

  python setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

  install -Dm 644 COPYING "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

